-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge new columns in existing record with default merge strategy #9851
Merge new columns in existing record with default merge strategy #9851
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9851 +/- ##
============================================
- Coverage 70.38% 60.66% -9.72%
- Complexity 5013 5321 +308
============================================
Files 1972 1960 -12
Lines 105687 105404 -283
Branches 15988 15987 -1
============================================
- Hits 74383 63940 -10443
- Misses 26109 36743 +10634
+ Partials 5195 4721 -474
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
9c73dd8
to
4c6fc15
Compare
@Jackie-Jiang / @KKcorps : please review! |
...-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
...-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
Outdated
Show resolved
Hide resolved
...-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
Outdated
Show resolved
Hide resolved
4c6fc15
to
e0a3687
Compare
Related to #9771
After a schema evolves (eg. new column added), the column is not treated as an upsert column by the partition upsert manager because it is not part of
PartialUpsertHandler#column2Mergers
. This PR attempts to fix this by iterating through all columns in the record and applying a default merge strategy on all columns, except primary key and comparison column.Note: This PR can handle schema evolution of adding new columns without restarting the server, as long as there are no changes to the upsert config. Any change made to the
upsertConfig: {}
section in the table config of a partial upsert enabled table will require a server restart to correctly reload all segments and the metadata.Labels:
bugfix